<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('商户修改')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-merchantInfo-addCtGrmer">
            <input type="hidden" name="merno" th:value="${merchant[MERNO]}">
            <fieldset>
                <legend>商户信息</legend>
                <div class="col-md-4">
                    <div class="form-group">
                        <label class="font-noraml">服务商编号：</label>
                        <label class="font-noraml" th:text="${merchant[AGENT_NUM]}"></label>
                    </div>
                    <div class="form-group">
                        <label class="font-noraml">商户简称：</label>
                        <label class="font-noraml" th:text="${merchant[MER_SHORTNAME]}"></label>
                    </div>

                    <div th:if="${merchant[MER_NATURE] eq 0}">
                        <div class="form-group">
                            <label class="font-noraml">社会信用代码：</label>
                            <label class="font-noraml" th:text="${merchant[SOCIAL_REDIT_CODE]}"></label>
                        </div>
                        <div class="form-group">
                            <label class="font-noraml is-required">协议编号：</label>
                            <label class="font-noraml" th:text="${merchant[AGREEMENT_NO]}"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="font-noraml">商户状态：</label>
                        <label class="font-noraml" th:if="${merchant[MER_STATUS] eq 0}">正式商户</label>
                        <label class="font-noraml" th:if="${merchant[MER_STATUS] eq 1}">商户停用</label>
                        <label class="font-noraml" th:if="${merchant[MER_STATUS] eq 2}">待提交资质</label>
                        <label class="font-noraml" th:if="${merchant[MER_STATUS] eq 3}">审核中</label>
                        <label class="font-noraml" th:if="${merchant[MER_STATUS] eq 4}">审核打回[退回修改]</label>
                        <label class="font-noraml" th:if="${merchant[MER_STATUS] eq 5}">待绑定终端</label>
                        <label class="font-noraml" th:if="${merchant[MER_STATUS] eq 6}">身份认证[手刷实名认证第一步]</label>
                        <label class="font-noraml" th:if="${merchant[MER_STATUS] eq 7}">结算卡认证[手刷实名认证第二步]</label>
                        <label class="font-noraml" th:if="${merchant[MER_STATUS] eq 8}">绑定店铺[手刷实名认证第三步]</label>
                        <label class="font-noraml" th:if="${merchant[MER_STATUS] eq 9}">企业商户状态-终止审核状态</label>
                    </div>
                    <div class="form-group">
                        <label class="font-noraml">证件号码：</label>
                        <label class="font-noraml" th:text="${merchant[SHOW_LEGALCERNO]}"></label>
                    </div>
                    <div class="form-group">
                        <label class="font-noraml">邮箱：</label>
                        <label class="font-noraml" th:text="${merchant[LINK_EMAIL]}"></label>
                    </div>

                </div>

                <div class="col-md-4">
                    <div class="form-group">
                        <label class="font-noraml">服务商名称：</label>
                        <label class="font-noraml" th:text="${merchant[AGENT_NAME]}"></label>
                    </div>
                    <div th:if="${merchant[MER_NATURE] eq 0}">
                        <div class="form-group">
                            <label class="font-noraml">信用代码有效期：</label>
                            <label class="font-noraml">永久</label>
                        </div>
                        <div class="form-group">
                            <label class="font-noraml">营业时间：</label>
                            <label class="font-noraml" th:text="${merchant[BUSINESS_STARTTIME]+'至'+merchant[BUSINESS_ENDTIME]}"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="font-noraml">商户性质：</label>
                        <label class="font-noraml" th:if="${merchant[MER_NATURE] eq 0}">企业</label>
                        <label class="font-noraml" th:if="${merchant[MER_NATURE] eq 1}">个人</label>
                    </div>
                    <div class="form-group">
                        <label class="font-noraml">姓名：</label>
                        <label class="font-noraml" th:text="${merchant[LEGAL_NAME]}"></label>
                    </div>
                    <div class="form-group">
                        <label class="font-noraml">联系人：</label>
                        <label class="font-noraml" th:text="${merchant[LINK_MAN]}"></label>
                    </div>
                    <div class="form-group">
                        <label class="font-noraml">商户地址：</label>
                        <label class="font-noraml" th:text="${merchant[MER_AREA]}"></label>
                    </div>

                </div>
                <div class="col-md-4">
                    <div class="form-group">
                        <label class="font-noraml">商户全称：</label>
                        <label class="font-noraml" th:text="${merchant[MER_NAME]}"></label>
                    </div>
                    <div class="form-group">
                        <label class="font-noraml">商户类别：</label>
                        <label class="font-noraml" th:if="${merchant[MER_CATEGORY] eq 0}">标准类</label>
                        <label class="font-noraml" th:if="${merchant[MER_CATEGORY] eq 1}">优惠类</label>
                        <label class="font-noraml" th:if="${merchant[MER_CATEGORY] eq 2}">减免类</label>
                    </div>
                    <div th:if="${merchant[MER_NATURE] eq 0}">
                        <div class="form-group">
                            <label class="font-noraml">信用代码有效期：</label>
                            <label class="font-noraml" th:text="${merchant[SRC_START_DATE]+'至'+merchant[SRC_END_DATE]}"></label>
                        </div>
                        <div class="form-group">
                            <label class="font-noraml">注册地址：</label>
                            <label class="font-noraml" th:text="${merchant[SHOP_ADDRESS]}"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="font-noraml">证件类型：</label>
                        <label class="font-noraml" th:if="${merchant[LEGAL_CER] eq 0}">身份证</label>
                        <label class="font-noraml" th:if="${merchant[LEGAL_CER] eq 1}">护照</label>
                    </div>
                    <div class="form-group">
                        <label class="font-noraml">联系电话：</label>
                        <label class="font-noraml" th:text="${merchant[SHOW_LINKPHONE]}"></label>
                    </div>
                    <div class="form-group">
                        <label class="font-noraml">详细地址：</label>
                        <label class="font-noraml" th:text="${merchant[MER_ADDRESS]}"></label>
                    </div>

                </div>

            </fieldset>

            <fieldset>
                <legend>账户信息</legend>
                <div class="col-md-4">
                    <div class="form-group">
                        <label class="font-noraml">结算周期：</label>
                        <label class="font-noraml" th:if="${merchant[SETTLE_CYCLE] eq 0}">D0</label>
                        <label class="font-noraml" th:if="${merchant[SETTLE_CYCLE] eq 1}">T1</label>
                    </div>
                    <div class="form-group">
                        <label class="font-noraml">结算人身份证：</label>
                        <label class="font-noraml" th:text="${merchant[SHOW_SCREENIDNUM]}"></label>
                    </div>
                    <div class="form-group">
                        <label class="font-noraml">起结金额：</label>
                        <label class="font-noraml" th:text="${null==merchant[ACMONEY] ? '0元': merchant[ACMONEY]+'元'}"></label>
                    </div>
                </div>

                <div class="col-md-4">
                    <div class="form-group">
                        <label class="font-noraml">银行名称：</label>
                        <label class="font-noraml" th:text="${merchant[BANK_HEADNAME]}"></label>
                    </div>
                    <div class="form-group">
                        <label class="font-noraml">结算卡：</label>
                        <label class="font-noraml" th:text="${merchant[SHOW_SCREENNUM]}"></label>
                    </div>
                </div>
                <div class="col-md-4">
                    <div class="form-group">
                        <label class="font-noraml">开户名称：</label>
                        <label class="font-noraml" th:text="${merchant[SCREEN_NAME]}"></label>
                    </div>
                    <div class="form-group">
                        <label class="font-noraml">预留手机号：</label>
                        <label class="font-noraml" th:text="${merchant[SHOW_RESPHONE]}"></label>
                    </div>
                </div>
            </fieldset>
            <!--<fieldset>
                <legend>结算费率</legend>
                <div class="col-sm-15 select-table table-striped">
                    <table id="bootstrap-table" ></table>
                </div>
            </fieldset>-->

        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "merchantInfo/merchantInfo";

/*
        $(function() {
            var options = {
                url: ctx + "merchantInfo/merchantInfo/selectMerRate",
                showSearch: false,
                showRefresh: false,
                showToggle: false,
                showColumns: false,
                clickToSelect:true,
                pagination:false,
                pageSize: 20,
                onLoadSuccess: function (data) {
                },
                columns: [
                    {
                        field : 'RATE_TYPE',
                        title : '消费类型',
                        formatter: function(value, row, index) {
                            if ("0"==value){
                                return '<span>刷卡</span>';
                            }else if("1"==value){
                                return '<span>云闪付</span>';
                            }else if("2"==value){
                                return '<span>微信</span>';
                            }else if("3"==value){
                                return '<span>支付宝</span>';
                            }else if("4"==value){
                                return '<span>银联二维码</span>';
                            }else{
                                return '<span style="color:gray;">无</span>';
                            }
                        }

                    },
                    {
                        field : 'SETTLE_TYPE',
                        title : '结算周期',
                        formatter: function(value, row, index) {
                            if ("0"==value){
                                return '<span>D0</span>';
                            }else if("1"==value){
                                return '<span>T1</span>';
                            }else{
                                return '<span style="color:gray;">无</span>';
                            }
                        }
                    },
                    {
                        field : 'CARD_TYPE',
                        title : '卡类型',
                        formatter: function(value, row, index) {
                            if ("1"==value){
                                return '<span>借记卡</span>';
                            }else if("2"==value){
                                return '<span>贷记卡</span>';
                            }else{
                                return '<span style="color:gray;">无</span>';
                            }
                        }
                    },
                    {
                        field : 'RATE_CODE',
                        title : '费率',
                        formatter: function(value, row, index) {
                            return value=='' || value==undefined ? '<span style="color:gray;">无</span>':value + '%';
                        }
                    },
                    /!*{
                        field : 'city',
                        title : 'ARMARK_FD',
                        formatter: function(value, row, index) {
                            return value=='' || value==undefined ? '<span style="color:gray;">无</span>':value;
                        }
                    },*!/
                ]
            };
            $.table.init(options);
        });
*/




        function selectMerRate() {
            var merno=$("[name='merno']").val();
            var width=800;
            var height=$(window).height() - 50;
            if ($.common.isMobile()) {
                width = 'auto';
                height = 'auto';
            }
            var url = prefix + "/selectMerRate/"+merno;
            var btn = ['关闭'];
            var options = {
                title: '查看结算费率',
                width: width,
                height: height,
                url: url,
                btn: btn,
                yes:function(index){
                    layer.close(index);
                }
            };
            $.modal.openOptions(options);
        }
    </script>
</body>
</html>